package com.zmovie.front.constant;

import com.zmovie.front.util.DateUtil;

import java.text.SimpleDateFormat;
import java.util.*;

/**
 * @author 挚爱之夕
 * @version 1.0
 * @implSpec com.zmovie.front.constant
 * @since 2023-12-20 17:40
 */
public class Test {
    public static void main(String[] args) {
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Set<Date> set = new HashSet<>();
        Date date = new Date();
        set.add(date);
        date = new Date(2012 - 1990, 3, 9);
        set.add(date);
        ArrayList<Date> dates = new ArrayList<>(set);
        Collections.sort(dates);
        for(Date d : dates){
            System.out.println(format.format(d));
        }
    }
}
